home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1995 #5 & #6
/
Amiga Plus CD - 1995 - No. 5 and 6.iso
/
pd
/
serien
/
purity
/
nr.10
/
demo
/
sparx.i
/
.spark12.i
< prev
next >
Wrap
Text File
|
1995-04-19
|
963b
|
57 lines
Procedure Spark12;
Const
max4lines = 40;
Type
Sp1lines = Array[1..max4lines] of line;
Sp1LinesPtr = ^Sp1Lines;
Var
arr : Sp1LinesPtr;
cnt1,
cnt2,
CCNT,
add1,
add2,
actualline : Short;
Begin
New(arr);
ActualLine := 1;
cnt1 := 546; add1 := 7; { x1 }
cnt2 := 3; add2 := 3; { y1 }
CCNT := 2; { color }
Repeat
EraseLine( Adr(arr^[actualline]) );
With arr^[actualline] do begin
x1 := 170 + XSin^[cnt1] * 6 DIV 5; { +- max.120 }
y1 := 110 + XCos^[cnt2] * 11 DIV 10; { +- max.110 }
x2 := dff006 MOD 320;
y2 := dff006 MOD 256;
end;
cnt1 := cnt1 + add1;
if cnt1>627 then cnt1:= cnt1-628;
cnt2 := cnt2 + add2;
if cnt2>627 then cnt2:= cnt2-628;
DrawLine( Adr(arr^[actualline]), CCNT );
inc( CCNT );
If CCNT > maxColors then CCNT := 2;
inc( actualline );
If actualline >= max4lines then actualline := 1;
Until LeftMouseButton;
Ciao;
Dispose(arr);
SetSColors(Adr(Def_Colors));
End;